﻿@model PagedList<Core_UserGrant>
@{
    ViewBag.ParentUrl = "/Log/Assign";
    ViewBag.Title = "分配日志";

}
@section header{
    <style>
        .profile-info-name {
            width: auto;
        }
    </style>
}
@section breadcrumb
{
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-home home-icon"></i>
            <a href="/">首页</a>
        </li>
        <li class="active">@ViewBag.Title</li>
    </ul><!-- .breadcrumb -->
}
<div class="col-sm-12">
    <div class="tabbable">
        <ul class="nav nav-tabs padding-16">
            <li  name="item">
                <a href="/log/assign/?f=1">
                    历史分配记录
                </a>
            </li>
            <li name="item">
                <a href="/log/assign/?f=2">
                    被分配记录
                </a>
            </li>
            @if (ViewBag.RoleId == 0)
            {
                <li name="item">
                    <a href="/log/assign/?f=3">
                        所有用户分配记录
                    </a>
                </li>
            }
        </ul>

        <div class="tab-content profile-edit-tab-content">
            <div class="tab-pane in active">

                <div class="row">
                    <div class="col-xs-12">
                        <div class="table-responsive">
                            <h4 class="pink">
                                <i class="ace-icon fa fa-hand-o-right icon-animated-hand-pointer blue"></i>
                                <a href="###" role="button" class="green" data-toggle="modal">分配日志记录</a>
                            </h4>
                            <div class="hr hr-18 dotted hr-double"></div>
                            <div class="nav-search" id="nav-search" style="top: 6px;">
                                <form class="form-search">
                                    <span class="">
                                        <input type="text" placeholder="关键字搜索" class="nav-search-input col-xs-10 col-sm-5" style="width: 280px;" id="key" name="key" value="@Request.QueryString["key"]">
                                    </span>
                                    <button type="submit" class="btn btn-info btn-xs">
                                        <i class="ace-icon fa fa-search bigger-110"></i>
                                        搜索
                                    </button>
                                </form>
                            </div><!-- #nav-search -->
                            <!-- PAGE CONTENT BEGINS -->
                            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <th>分配人</th>
                                        <th>被分配人</th>
                                        <th>分配次数</th>
                                        <th>分配票号</th>
                                        <th>备注</th>
                                        <th>时间</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @foreach (var item in Model)
                                    {

                                        <tr>
                                            <td>
                                                @item.UG_FromUName
                                            </td>
                                            <td>@item.UG_ToUName</td>
                                            <td>@item.UG_InvoiceCount</td>
                                            <td>@item.UG_InterfaceCount</td>
                                            <td>@item.UG_Memo</td>
                                            <td>@item.UG_Time</td>
                                        </tr>
                                    }
                                </tbody>
                            </table>
                        </div> <!-- PAGE CONTENT ENDS -->
                        @Html.Pager(Model, new PagerOptions { FirstPageText = "首页", PrevPageText = "上一页", NextPageText = "下一页", LastPageText = "末页", PageIndexParameterName = "id", NumericPagerItemCount = 5, ContainerTagName = "ul", CssClass = "pagination", CurrentPagerItemTemplate = "<li class=\"active\"><a href=\"#\">{0}</a></li>", DisabledPagerItemTemplate = "<li class=\"disabled\"><a>{0}</a></li>", PagerItemTemplate = "<li>{0}</li>", Id = "mvcpager" })
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div>
        </div>
    </div>

</div><!-- /.span -->
@section footer{
<script>
    $(function () {
        var flag = @ViewBag.F;

        $('li[name="item"]').eq(flag-1).addClass("active");

    });
</script>
}
